<div id="user_list">
    <div class="control_nav">
        <div class="control_nav_l">
            &nbsp;
        </div>
        <div class="control_nav_r">
            <a href="<?php echo site_url('admin/student/add');?>"><?php echo image_asset('icons/add.png',''); ?> <?php echo $this->lang->line('add'); ?></a>
        </div>
        <div class="clear"></div>
    </div>
    
    <table id="user_list_tb" class="list_tb datatable">
        <thead>
            <tr>
                <th class="check_alls"><input type="checkbox" /></th>
                <th><?php echo $this->lang->line('username'); ?></th>
                <th><?php echo $this->lang->line('firstname'); ?></th>
                <th><?php echo $this->lang->line('lastname'); ?></th>
                <th><?php echo $this->lang->line('email'); ?></th>
                <th><?php echo $this->lang->line('group'); ?></th>
                <th class="status"><?php echo $this->lang->line('status'); ?></th>
                <th class="action"></th>
            </tr>
        </thead>
        <tbody>
        <?php
            if(is_array($student_list)){
                foreach($student_list as $val){
                    $status = $val['status']==='1'?'Active':'Deactive';
                    $video = '<a href="'.site_url('admin/student/video/'.$val['id']).'" title="videos">'.image_asset('icons/film.png','',array('alt'=>'videos')).'</a>';
                    $edit = '<a href="'.site_url('admin/student/edit/'.$val['id']).'" title="edit">'.image_asset('icons/pencil.png','',array('alt'=>'edit')).'</a>';
                    $delete = '<a href="'.site_url('admin/student/delete/'.$val['id']).'" title="delete">'.image_asset('icons/delete.png','',array('alt'=>'delete')).'</a>';
                    echo <<<EOF
                        <tr>
                            <td class="center"><input type="checkbox" name="id[]" value="{$val['id']}" /></td>
                            <td>{$val['username']}</td>
                            <td>{$val['firstname']}</td>
                            <td>{$val['lastname']}</td>
                            <td>{$val['email']}</td>
                            <td class="center">{$val['group_title']}</td>
                            <td class="center">{$status}</td>
                            <td class="center">{$video} {$edit} {$delete}</td>
                        </tr>
EOF;
                }
            }else{
                echo '<tr><td colspan="7" class="center">' , $this->lang->line('student empty') , '</td></tr>';
            }
        ?>
        </tbody>
    </table>
    <div class="clear"></div>
</div>